package com.sc.mockweipo.controller;

import com.sc.mockweipo.service.LikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sc
 * Created on  2017/12/22
 */
@RestController
public class Controller {

    @Autowired
    private LikeService likeService;

    /**
     * 美女注册
     */
    @GetMapping("/addBeauty")
    public void addBeauty(String name){
        likeService.addBeauty(name);
    }

    /**
     * 关注她
     */
    @GetMapping("/like")
    public void like(String boyName,String girlName)
    {
        likeService.like(boyName,girlName);
    }

    /**
     * 取关
     */
    @GetMapping("/unlike")
    public void unlike(String boyName,String girlName){
        likeService.unlike(boyName,girlName);
    }

    /**
     * 美女发朋友圈了
     */
    @GetMapping("/post")
    public void postMessage(String girlName,String message){
         likeService.postMessage(girlName,message);
    }

}
